<!DOCTYPE html>
<html lang="en" class="app">
<head>
    <meta charset="utf-8" />
    <title>登陆</title>
    <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
    <link rel="stylesheet" href="css/simple-line-icons.css" type="text/css" />
    <link rel="stylesheet" href="css/app.css" type="text/css" />
</head>
<body background="images/bodybg.jpg">
	<div id="den">
<section id="content" class="m-t-lg wrapper-md animated fadeInUp ">
    <div class="container aside-xl" style="margin-top: 48px;">
        <a class="navbar-brand block"><span class="h1 font-bold" style="color: #ffffff">管理员登录</span></a>
        <section class="m-b-lg">

                <strong class="text-sucess">管理员登录/strong>

            <form action="javascript:;" method="post" >
                <div class="form-group">
                    <input v-model="userName" type="username" name="username" placeholder="用户名" class="form-control  input-lg text-center no-border">
                </div>
                <div class="form-group">
                    <input v-model="userPassword" type="password" name="password" placeholder="密码" class="form-control  input-lg text-center no-border">
                </div>

                <button @click="login" type="submit" class="btn btn-lg btn-danger lt b-white b-2x btn-block" id="validate-submit">
                    <i  class="icon-arrow-right pull-right"></i><span class="m-r-n-lg">登录</span></button>
                     
            </form>
        </section>
    </div>
</section>

   </div>
                <script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
                <script type='text/javascript' src='js/jquery.easing.1.3.js'></script>
                <script type='text/javascript' src='js/prettyphoto/jquery.prettyPhoto.js'></script>
                <script type='text/javascript' src='js/jflickrfeed.js'></script>
                <script type='text/javascript' src='js/jquery.liveSearch.js'></script>
                <script type='text/javascript' src='js/jquery.form.js'></script>
                <script type='text/javascript' src='js/jquery.validate.min.js'></script>
                <script type='text/javascript' src='js/custom.js'></script>
                <script type="text/javascript" src="js/url.js"></script>
				<script type="text/javascript" src="js/vue(1).js"></script>
				<script type="text/javascript" src="js/axios.min.js"></script>
				<script>
					var vue = new Vue({
						el: '#den', //挂载点
						data: {
							userName:'',
							userPassword:''
						},
						created: function() {
							
						},
						methods: {
							//查所有
							login: function() {
								var self = this;
								var param=new URLSearchParams();	
								param.append('userName',self.userName);
								param.append('userPassword',self.userPassword);
								param.append('userSort','2');
								axios
								.post(web_server+"login",param)
									.then(function(response) {
										//var object =JSON.stringify(response)
										var objects= response.data;
										if(objects.status == 200) {
											var object = objects.data
												self.list= object;
												window.sessionStorage.setItem("userSort", 2);
												window.sessionStorage.setItem("userId", object.userId);
												window.sessionStorage.setItem("userNickname", object.userNickname);
												window.location.href = "main.html";
												//this.moun;
												//self.list.size=self.commentLenght;
												//console.log(self.list[0].commentList)
										}else if(objects.status == 500){
											alert(objects.message)
										}
									})
							.catch(function(error) {
								alert(error)
								
							});
							}
							
						}
					})
				</script>
				
</body>
</html>
